<?php  
	namespace Account\Controller;
	use Think\Model;
	class PersonController extends BaseController{
		function index(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function information(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function safety(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function password(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				if(IS_POST){
					$account = D('UserAccount');
					if(PWmd5(I('post.yuanmima')) === session('user_account.password')){
						if($a = $account->create('',6)){
							$user_id = array('id'=>session('user_account.id'));
							if( $account->where($user_id)->save($a)){
								$this->success('密码修改成功...!',U('Shop/loginout'));
							}else{
								$this->error($account->getError());
							}
						}else{
							$this->error($account->getError());
						}
					}else{
						$this->error($account->getError());
					}
				}
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}

		}
		function address(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function order(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function bill(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function change(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function bonus(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function coupon(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function collection(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function foot(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function comment(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function news(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function blog(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function logistics(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function record(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function commentlist(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function walletlist(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function wallet(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function cardlist(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function points(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function consultation(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		function suggest(){
			if(session('?user_account')){
				$array['user_account'] = session('user_account');
				$this->assign($array);
				$this->display();
			}else{
				$this->error('您没有登陆，请你先登录...!');
			}
		}
		// function index(){
		// 	if(session('?user_account')){
		// 		$array['user_account'] = session('user_account');
		// 		$this->assign($array);
		// 		$this->display();
		// 	}else{
		// 		$this->error('您没有登陆，请你先登录...!');
		// 	}
		// }
		// function index(){
		// 	if(session('?user_account')){
		// 		$array['user_account'] = session('user_account');
		// 		$this->assign($array);
		// 		$this->display();
		// 	}else{
		// 		$this->error('您没有登陆，请你先登录...!');
		// 	}
		// }
	}
?>